#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
struct student {
	string name;
	int age;
	int grade;
	student(string _na, int _ag, int _gr) {
		name = _na;
		age = _ag+1;
		grade = _gr * 1.2;
		 grade = min( grade,600);
	}
	student() {};
};
int main()
{
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n;
	cin >> n;
	while (n--) {
//		student s;
//		cin >> s.name >> s.age >> s.grade;
//		int tmp = s.grade * 1.2;
		string tmp;
		int t_ag;
		int t_gr;
		cin >> tmp >> t_ag >> t_gr;
		student s(tmp, t_ag, t_gr);
		cout << s.name << ' ' << s.age << ' ' <<s.grade << '\n';
	}
	return 0;
}